home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / Kubuntu 8.10 / kubuntu-8.10-desktop-i386.iso / casper / filesystem.squashfs / etc / event.d / rcS-sulogin < prev    next >
Text File  |  2008-09-29  |  575b  |  29 lines

  1. # rcS-sulogin - "single-user" runlevel compatibility
  2. #
  3. # This task runs the sulogin binary during "single-user" mode.
  4.  
  5. start on runlevel S
  6.  
  7. stop on runlevel
  8.  
  9. console owner
  10. script
  11.     runlevel --set S >/dev/null || true
  12.     if [ -x /usr/share/recovery-mode/recovery-menu ]; then
  13.         /usr/share/recovery-mode/recovery-menu
  14.     else
  15.         /sbin/sulogin
  16.     fi
  17.  
  18.     if [ -r /etc/inittab ]; then
  19.         RL="$(sed -n -e "/^id:[0-9]*:initdefault:/{s/^id://;s/:.*//;p}" /etc/inittab || true)"
  20.         if [ -n "$RL" ]; then
  21.         telinit $RL
  22.         else
  23.         telinit 2
  24.         fi
  25.     else
  26.         telinit 2
  27.     fi
  28. end script
  29.